package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"local-life/api/internal/config"
	"local-life/liferpc/liferpcclient"
)

type ServiceContext struct {
	Config  config.Config
	LifeRpc liferpcclient.Liferpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		LifeRpc: liferpcclient.NewLiferpc(zrpc.MustNewClient(c.LifeRpc)),
	}
}
